<script type="text/javascript" lang="javascript">
jQuery(document).ready(function () {
	/*********************
		Custom function and addition
	*********************/ 
	
});/*EOF jQuery*/

/*********************
  Copy - institutionsal details
*********************/ 
function cpy_inst(){
  var n = $("#os_mem_copy_inv:checked").length;
  if(n > 0){
    /*copy info*/
    $("#os_mem_inv_code").val($('#os_mem_ins_code').val());
    $("#os_mem_inv_ins_name").val($('#os_mem_ins_name').val());
    $("#os_mem_inv_add1").val($('#os_mem_ins_add1').val());
    $("#os_mem_inv_add2").val($('#os_mem_ins_add2').val());
    $("#os_mem_inv_city").val($('#os_mem_ins_city').val());
    $("#os_mem_inv_state").val($('#os_mem_ins_state').val());
    $("#os_mem_inv_postcode").val($('#os_mem_ins_postcode').val());
    $("#os_mem_inv_country").val($('#os_mem_ins_country').val());
    $("#os_mem_inv_email").val($('#os_mem_ins_email').val());
    $("#os_mem_inv_phone").val($('#os_mem_ins_phone').val());
    $("#os_mem_inv_fax").val($('#os_mem_ins_fax').val());
  }else{
    $("#os_mem_inv_code").val('');
    $("#os_mem_inv_name").val('');
    $("#os_mem_inv_add1").val('');
    $("#os_mem_inv_add2").val('');
    $("#os_mem_inv_city").val('');
    $("#os_mem_inv_state").val('');
    $("#os_mem_inv_postcode").val('');
    $("#os_mem_inv_country").val('');
    $("#os_mem_inv_email").val('');
    $("#os_mem_inv_phone").val('');
    $("#os_mem_inv_fax").val('');
  }
}
/*********************
  Copy - admin details
*********************/ 
function cpy_adm(){
  var n = $("#os_mem_copy_adm:checked").length;
  if(n > 0){
    /*copy info*/
    $("#os_mem_tech_name").val($('#os_mem_adm_name').val());
    $("#os_mem_tech_desg").val($('#os_mem_adm_desg').val());
    $("#os_mem_tech_dept").val($('#os_mem_adm_dept').val());
    $("#os_mem_tech_email").val($('#os_mem_adm_email').val());
    $("#os_mem_tech_phone").val($('#os_mem_adm_phone').val());
    $("#os_mem_tech_mobile").val($('#os_mem_adm_mobile').val());
    $("#os_mem_tech_fax").val($('#os_mem_adm_fax').val());
  }else{
    $("#os_mem_inv_code").val('');
    $("#os_mem_inv_name").val('');
    $("#os_mem_inv_add1").val('');
    $("#os_mem_inv_add2").val('');
    $("#os_mem_inv_city").val('');
    $("#os_mem_inv_state").val('');
    $("#os_mem_inv_postcode").val('');
    $("#os_mem_inv_country").val('');
    $("#os_mem_inv_email").val('');
    $("#os_mem_inv_phone").val('');
    $("#os_mem_inv_fax").val('');
  }
}
</script>
<h2><?php echo $cont_title; ?></h2>
<?php $this->load->view('admin_messages',$msg_info); ?>
<form action="<?php __e($frm_action);?>" method="post" name="<?php __e($frm_name);?>" id="<?php __e($frm_name);?>" class="frmreg" enctype="multipart/form-data">
  <input type="hidden" name="frm_token" id="frm_token" value="<?php __e($frm_token);?>" />
  <input type="hidden" name="frm_mode" id="frm_mode" value="<?php __e($frm_mode);?>" />
  <input type="hidden" name="frm_id" id="frm_id" value="<?php __e($frm_id);?>" />
  
  <table border="0" cellpadding="0" cellspacing="0" class="frm_geneal_det">
    <tr>
      <td>
        <?php $chk = __earray($post_arr, 'os_mem_ip_info', TRUE); ?>
        <input type="radio" name="os_mem_ip_info" id="os_mem_ip" class="padup" value="ip" <?php if($chk == 'ip' || empty($chk)){__e('checked="checked"');}?>/>          
        <label for="os_mem_ip"><strong>Static IP</strong> address used by our institution</label>
        <span class="example">Example: 192.168.1.2.0;102.188.1.2.1</span>
        <input type="text" name="os_mem_ip_add" id="os_mem_ip_add" value="<?php __earray($post_arr, 'os_mem_ip_add'); ?>" maxlength="20" />
      </td>
    </tr>
    
    <tr>
      <td>
        <input type="radio" name="os_mem_ip_info" id="os_mem_login" class="padup" value="login" <?php if($chk == 'login'){__e('checked="checked"');}?>/>          
        <label for="os_mem_login">We don&apos;t have <strong>Static IP</strong> address, please issue a password based login</label>
      </td>
    </tr>
    
    
    <tr>
      <td>
        <input type="radio" name="os_mem_ip_info" id="os_mem_noip" class="padup" value="noip" <?php if($chk == 'noip'){__e('checked="checked"');}?>/>          
        <label for="os_mem_noip"><strong>Static IP</strong> address will be provided later</label>
      </td>
    </tr>   
    
    <tr>
      <td><strong>Registration User: </strong>
        <table border="0" cellpadding="0" cellspacing="0" class="frm_inst_details"  width="50%">
          <tr>
            <td width="20%"><?php $chk = __earray($post_arr, 'os_mem_reg_type', TRUE); ?>
              <input type="radio" name="os_mem_reg_type" id="os_mem_reg_type_ind" class="padup" value="individual" <?php if($chk == 'individual' || empty ($chk)){__e('checked="checked"');}?> />          
              <label for="os_mem_reg_type_ind"><i>Individual</i></label>
            </td>
            <td>
              <input type="radio" name="os_mem_reg_type" id="os_mem_reg_type_ins" class="padup" value="institution" <?php if($chk == 'institution'){__e('checked="checked"');}?>/>          
              <label for="os_mem_reg_type_ins"><i>Institution</i></label>
            </td>            
          </tr>
        </table>        
      </td>
    </tr>
  </table>
  
  <table border="0" cellpadding="0" cellspacing="0" class="frm_com" width="100%">
    <tr>
      <td width="49%" class="frm_col_left">
        <table border="0" cellpadding="0" cellspacing="0" class="frm_inst_details">
          <tr>
            <td colspan="2"><h3>Institutional Details</h3></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_code">Unique ID/Code</label></td>
            <td><input type="text" name="os_mem_ins_code" id="os_mem_ins_code" value="<?php __earray($post_arr, 'os_mem_ins_code'); ?>" maxlength="200" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_name"><span class="imp">*</span>&nbsp;Institution Name</label></td>
            <td><input type="text" name="os_mem_ins_name" id="os_mem_ins_name" value="<?php __earray($post_arr, 'os_mem_ins_name'); ?>" maxlength="300" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_add1"><span class="imp">*</span>&nbsp;Address1</label></td>
            <td><input type="text" name="os_mem_ins_add1" id="os_mem_ins_add1" value="<?php __earray($post_arr, 'os_mem_ins_add1'); ?>" maxlength="500" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_ins_add2"><span class="imp">&nbsp;</span>&nbsp;Address2</label></td>
            <td><input type="text" name="os_mem_ins_add2" id="os_mem_ins_add2" value="<?php __earray($post_arr, 'os_mem_ins_add2'); ?>" maxlength="500" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_ins_city"><span class="imp">*</span>&nbsp;City</label></td>
            <td><input type="text" name="os_mem_ins_city" id="os_mem_ins_city" value="<?php __earray($post_arr, 'os_mem_ins_city'); ?>" maxlength="200" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_state"><span class="imp">*</span>&nbsp;State</label></td>
            <td><input type="text" name="os_mem_ins_state" id="os_mem_ins_state" value="<?php __earray($post_arr, 'os_mem_ins_state'); ?>" maxlength="20" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_postcode"><span class="imp">*</span>&nbsp;Postcode</label></td>
            <td><input type="text" name="os_mem_ins_postcode" id="os_mem_ins_postcode" value="<?php __earray($post_arr, 'os_mem_ins_postcode'); ?>" maxlength="20" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_country"><span class="imp">*</span>&nbsp;Country</label></td>
            <td><input type="text" name="os_mem_ins_country" id="os_mem_ins_country" value="<?php __earray($post_arr, 'os_mem_ins_country'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_email"><span class="imp">*</span>&nbsp;Email</label></td>
            <td><input type="text" name="os_mem_ins_email" id="os_mem_ins_email" value="<?php __earray($post_arr, 'os_mem_ins_email'); ?>" maxlength="250" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_ins_phone"><span class="imp">*</span>&nbsp;Phone</label></td>
            <td><input type="text" name="os_mem_ins_phone" id="os_mem_ins_phone" value="<?php __earray($post_arr, 'os_mem_ins_phone'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_ins_fax"><span class="imp">&nbsp;</span>&nbsp;Fax</label></td>
            <td><input type="text" name="os_mem_ins_fax" id="os_mem_ins_fax" value="<?php __earray($post_arr, 'os_mem_ins_fax'); ?>" maxlength="100" /></td>
          </tr>
        </table>
      </td>
      <td class="brdspace">&nbsp;</td>
      <td width="49%" class="frm_col_right">
        <table border="0" cellpadding="0" cellspacing="0" class="frm_invoice_details">
          <tr>
            <td colspan="2">
              <h3>Invoice Details</h3>
              <div class="info"><?php $chk = __earray($post_arr, 'os_mem_copy_inv', TRUE); ?>
                <input type="checkbox" name="os_mem_copy_inv" id="os_mem_copy_inv" class="padup" onclick="javascript:cpy_inst();" value="1" <?php if($chk == '1'){__e('checked="checked"');}?>/>
                <label for="os_mem_copy_inv">Same as Institutional Details</label>
              </div>
            </td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_name"><span class="imp">*</span>&nbsp;Name</label></td>
            <td><input type="text" name="os_mem_inv_name" id="os_mem_inv_name" value="<?php __earray($post_arr, 'os_mem_inv_name'); ?>" maxlength="250" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_del"><span class="imp">&nbsp;</span>&nbsp;Delegation</label></td>
            <td><input type="text" name="os_mem_inv_del" id="os_mem_inv_del" value="<?php __earray($post_arr, 'os_mem_inv_del'); ?>" maxlength="250" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_ins_name"><span class="imp">*</span>&nbsp;Institution Name</label></td>
            <td><input type="text" name="os_mem_inv_ins_name" id="os_mem_inv_ins_name" value="<?php __earray($post_arr, 'os_mem_inv_ins_name'); ?>" maxlength="300" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_add1"><span class="imp">*</span>&nbsp;Address1</label></td>
            <td><input type="text" name="os_mem_inv_add1" id="os_mem_inv_add1" value="<?php __earray($post_arr, 'os_mem_inv_add1'); ?>" maxlength="500" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_inv_add2"><span class="imp">&nbsp;</span>&nbsp;Address2</label></td>
            <td><input type="text" name="os_mem_inv_add2" id="os_mem_inv_add2" value="<?php __earray($post_arr, 'os_mem_inv_add2'); ?>" maxlength="500" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_inv_city"><span class="imp">*</span>&nbsp;City</label></td>
            <td><input type="text" name="os_mem_inv_city" id="os_mem_inv_city" value="<?php __earray($post_arr, 'os_mem_inv_city'); ?>" maxlength="200" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_state"><span class="imp">*</span>&nbsp;State</label></td>
            <td><input type="text" name="os_mem_inv_state" id="os_mem_inv_state" value="<?php __earray($post_arr, 'os_mem_inv_state'); ?>" maxlength="20" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_postcode"><span class="imp">*</span>&nbsp;Postcode</label></td>
            <td><input type="text" name="os_mem_inv_postcode" id="os_mem_inv_postcode" value="<?php __earray($post_arr, 'os_mem_inv_postcode'); ?>" maxlength="20" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_country"><span class="imp">*</span>&nbsp;Country</label></td>
            <td><input type="text" name="os_mem_inv_country" id="os_mem_inv_country" value="<?php __earray($post_arr, 'os_mem_inv_country'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_email"><span class="imp">*</span>&nbsp;Email</label></td>
            <td><input type="text" name="os_mem_inv_email" id="os_mem_inv_email" value="<?php __earray($post_arr, 'os_mem_inv_email'); ?>" maxlength="250" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_inv_phone"><span class="imp">*</span>&nbsp;Phone</label></td>
            <td><input type="text" name="os_mem_inv_phone" id="os_mem_inv_phone" value="<?php __earray($post_arr, 'os_mem_inv_phone'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_inv_fax"><span class="imp">&nbsp;</span>&nbsp;Fax</label></td>
            <td><input type="text" name="os_mem_inv_fax" id="os_mem_inv_fax" value="<?php __earray($post_arr, 'os_mem_inv_fax'); ?>" maxlength="100" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr>  
    <tr>
      <td width="49%" class="frm_col_left">
        <table border="0" cellpadding="0" cellspacing="0" class="frm_admin_details">
          <tr>
            <td colspan="2"><h3>Administrative/Library Contact Details</h3></td>
          </tr>
          <tr>
            <td><label for="os_mem_adm_name"><span class="imp">*</span>&nbsp;Name</label></td>
            <td><input type="text" name="os_mem_adm_name" id="os_mem_adm_name" value="<?php __earray($post_arr, 'os_mem_adm_name'); ?>" maxlength="250" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_adm_desg"><span class="imp">&nbsp;</span>&nbsp;Designation</label></td>
            <td><input type="text" name="os_mem_adm_desg" id="os_mem_adm_desg" value="<?php __earray($post_arr, 'os_mem_adm_desg'); ?>" maxlength="250" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_adm_dept"><span class="imp">&nbsp;</span>&nbsp;Department</label></td>
            <td><input type="text" name="os_mem_adm_dept" id="os_mem_adm_dept" value="<?php __earray($post_arr, 'os_mem_adm_dept'); ?>" maxlength="250" /></td>
          </tr>                    
          <tr>
            <td><label for="os_mem_adm_email"><span class="imp">*</span>&nbsp;Email</label></td>
            <td><input type="text" name="os_mem_adm_email" id="os_mem_adm_email" value="<?php __earray($post_arr, 'os_mem_adm_email'); ?>" maxlength="250" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_adm_phone"><span class="imp">*</span>&nbsp;Phone</label></td>
            <td><input type="text" name="os_mem_adm_phone" id="os_mem_adm_phone" value="<?php __earray($post_arr, 'os_mem_adm_phone'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_adm_mobile"><span class="imp">&nbsp;</span>&nbsp;Mobile</label></td>
            <td><input type="text" name="os_mem_adm_mobile" id="os_mem_adm_mobile" value="<?php __earray($post_arr, 'os_mem_adm_mobile'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_adm_fax"><span class="imp">&nbsp;</span>&nbsp;Fax</label></td>
            <td><input type="text" name="os_mem_adm_fax" id="os_mem_adm_fax" value="<?php __earray($post_arr, 'os_mem_adm_fax'); ?>" maxlength="100" /></td>
          </tr>
        </table>
      </td>
      <td class="brdspace">&nbsp;</td>
      <td width="49%" class="frm_col_right">
        <table border="0" cellpadding="0" cellspacing="0" class="frm_tech_details">
          <tr>
            <td colspan="2">
              <h3>Technical Details</h3>
              <div class="info"><?php $chk = __earray($post_arr, 'os_mem_copy_inv', TRUE); ?>
                <input type="checkbox" name="os_mem_copy_adm" id="os_mem_copy_adm" onclick="javascript:cpy_adm();" class="padup" value="1" <?php if($chk == '1'){__e('checked="checked"');}?>/>
                <label for="os_mem_copy_adm">Same as Administrative/Library Contact Details</label>
              </div>
            </td>
          </tr>
          <tr>
            <td><label for="os_mem_tech_name"><span class="imp">*</span>&nbsp;Name</label></td>
            <td><input type="text" name="os_mem_tech_name" id="os_mem_tech_name" value="<?php __earray($post_arr, 'os_mem_tech_name'); ?>" maxlength="250" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_tech_desg"><span class="imp">&nbsp;</span>&nbsp;Designation</label></td>
            <td><input type="text" name="os_mem_tech_desg" id="os_mem_tech_desg" value="<?php __earray($post_arr, 'os_mem_tech_desg'); ?>" maxlength="250" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_tech_dept"><span class="imp">&nbsp;</span>&nbsp;Department</label></td>
            <td><input type="text" name="os_mem_tech_dept" id="os_mem_tech_dept" value="<?php __earray($post_arr, 'os_mem_tech_dept'); ?>" maxlength="250" /></td>
          </tr>                    
          <tr>
            <td><label for="os_mem_tech_email"><span class="imp">*</span>&nbsp;Email</label></td>
            <td><input type="text" name="os_mem_tech_email" id="os_mem_tech_email" value="<?php __earray($post_arr, 'os_mem_tech_email'); ?>" maxlength="250" /></td>
          </tr>          
          <tr>
            <td><label for="os_mem_tech_phone"><span class="imp">*</span>&nbsp;Phone</label></td>
            <td><input type="text" name="os_mem_tech_phone" id="os_mem_tech_phone" value="<?php __earray($post_arr, 'os_mem_tech_phone'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_tech_mobile"><span class="imp">&nbsp;</span>&nbsp;Mobile</label></td>
            <td><input type="text" name="os_mem_tech_mobile" id="os_mem_tech_mobile" value="<?php __earray($post_arr, 'os_mem_tech_mobile'); ?>" maxlength="100" /></td>
          </tr>
          <tr>
            <td><label for="os_mem_tech_fax"><span class="imp">&nbsp;</span>&nbsp;Fax</label></td>
            <td><input type="text" name="os_mem_tech_fax" id="os_mem_tech_fax" value="<?php __earray($post_arr, 'os_mem_tech_fax'); ?>" maxlength="100" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td colspan="3" align="right">&nbsp;</td>
    </tr>  
    <tr>
      <td align="right">
        <table border="0" cellpadding="0" cellspacing="0" class="frm_tech_details">
          <tr>
            <td colspan="2">
              <div class="info"><?php $chk = __earray($post_arr, 'os_mem_accp_terms', TRUE); ?>
                <input type="checkbox" name="os_mem_accp_terms" id="os_mem_accp_terms" class="padup" value="1" <?php __e( (!empty($chk))?'checked="checked"':'' );?>/>
                <label for="os_mem_accp_terms"><span class="imp">*</span> I Accept 
                  <a href="<?php __e(base_url().'images/media/books_pdf/SubscriptionAgreementIndividual.pdf');?>" target="_blank" title="Terms &amp; Conditions">Terms &amp; Conditions</a> 
                  of <?php __e(OS_CRM_TITLE); ?>
                </label>
              </div>
            </td>
          </tr>
          <tr>
            <td><label for="os_mem_comments"><span class="imp">&nbsp;</span>&nbsp;Comment</label></td>
            <td><textarea name="os_mem_comments" id="os_mem_comments" rows="5"><?php __earray($post_arr, 'os_mem_comments'); ?></textarea></td>
          </tr>
        </table>
      </td>
      <td colspan="2" align="right"></td>        
    </tr>
    <tr>
      <td colspan="3" align="right">
        <input type="submit" name="btn_reg" id="btn_reg" value="Register" class="btnreg btnpad"/>
        <input type="reset" name="btn_reset" id="btn_reset" value="Clear" class="btnreset btnpad"/>
      </td>
    </tr>
  </table>
</form>
